var path = require('path');
var htmlWebpackPlugin = require('html-webpack-plugin');

var ROOTPATH = process.cwd();
var CLIENTPATH = path.resolve(ROOTPATH, 'src','client');
var OUTPATH = path.resolve(ROOTPATH, 'dist/statics');

module.exports = {
  entry: {
    bundle: [path.resolve(CLIENTPATH, 'main.js')],
  },
  output: {
    path: OUTPATH,
    filename: '[name].js',
    publicPath: 'statics/',
  },
  module: {
    rules: [
      {
        //
      },
    ],
  },
  plugins: [
    new htmlWebpackPlugin({
      title: 'VueDemo',
      inject: 'body',
      chunks: ['bundle'],
      filename: '../index.html',
      template: path.resolve(ROOTPATH, 'index.html'),
    })
  ]
}
